const formatTime = (time) => {
    let year = new Date(time).getFullYear()
    let month = new Date(time).getMonth() + 1
    let day = new Date(time).getDate()
    let hour = new Date(time).getHours()
    let minute = new Date(time).getMinutes()

    hour = hour < 10 ? '0' + hour : hour
    minute = minute < 10 ? '0' + minute : minute
    return `${year}年${month}月${day}日  ${hour}:${minute}`
}

module.exports = formatTime
